Skip to main content

Unit 2 Exercise 1

Exercise 1: Define a Global Property

Objective

To replace hardcoded text in the command line with Global Properties so that the command lines are future proofed should the values need to be changed.

Summary

Create two Global Properties, RUNTIME with a value of 10 and PATH_Windows with a value of C:\Program Files\OpConxps\MSLSAM. For three of the jobs in MY FIRST SCHEDULE, replace the hardcoded text with the newly created properties.

Build MY FIRST SCHEDULE for today, then view the schedule's performance in Processes screen. Verify that the proper values are attributed to the Properties used.

The command line should change from “C:\Program Files\OpConxps\MSLSAM\genericp.exe” -t20 to “[[PATH_Windows]]\genericp.exe” -t[[RUNTIME]].

Instructions

Create the Global Properties

  1. In the Library > Administration, select Global Properties.
  2. Click the Add button.
  3. In the Name field, enter RUNTIME.
  4. In the Value field, enter 10.
  5. Add this Documentation to the Global Property
  • Example: This Global Property will store the number of seconds to run the program.
  1. Click the Save button.
  2. Click the Add button on the Global Properties toolbar.
  3. In the Name textbox, type PATH_Windows.
  4. In the Value textbox, enter C:\Program Files\OpConxps\MSLSAM
  5. Add Documentation to the Global Property.
  • Example: This Global Property will store the path to the MSLSAM directory.
  1. Click the Save button on the Global Properties toolbar.
  2. Close Library.

Modify the Jobs

  1. Under Library > Administration, select Master Jobs.
  2. Using the filters, locate and select Windows Job 1 in My First Schedule.
  3. Click the Edit button.
  4. Click the Lock icon in the upper right-hand corner.
  5. Expand Task Details, if not already expanded.
  6. Locate the Command Line and highlight C:\Program Files\OpConxps\MSLSAM.
  7. Using either, the Magic Wand or CTRL+SPACE, pull up the Property Selector window.
  8. Using the Search filter, locate and select the property called PATH_Windows.
  9. Click OK.
  10. Locate the Command Line and highlight 10.
  11. Using either, the Magic Wand or CTRL+SPACE, pull up the Property Selector window.
  12. Using the Search filter, locate and select the property called RUNTIME.
  13. Click OK.
Note

Your updated Command Line should now look like:

"[[PATH_Windows]]\genericp.exe" -t[[RUNTIME]]

  1. Click the Save button.
  2. Repeat steps 14-25 to modify the Command Lines for Windows Job 2 and Windows Job 3.
  3. Close Library.

Build the Schedule and Validate that the Global Properties are resolved

  1. Open Operations and click on Schedule Build.
  2. Validate that today is the date for the From and To fields.
  3. In the Schedule Build section, select the Released radial button.
  4. Select My First Schedule from the Schedule List.
  5. Click Build
  6. On the Build Results screen, expand the dropdown menus until you can see and click on My First Schedule.
  7. Click the My First Schedule link to open the Schedule in Processes.
  8. Verify that all Jobs Finished OK.
  9. Right-click on one of the four jobs that were modified.
  10. In the Job Selection panel, select Job Output.
  11. Click Refresh.
  12. Click on the link that appears after the Refresh is complete.
  13. Look at lines four and five and validate that the Global Properties resolved to C:\Program Files\OpConxps\MSLSAM and 10 respectively.
  14. Close the Job Output.
  15. Close Operations.

Enterprise Manager

Details
  1. Under the Administration topic, Double-Click on Global Properties.
  2. Click the Add button on the Global Properties toolbar.
  3. In the Name textbox, type RUNTIME.
  4. Add this Documentation to the Global Property: This Global Property will store the number of seconds to run the program.
  5. In the Value textbox, type 10.
  • Do not check the Encrypted checkbox.
  1. Click the Save button on the Global Properties toolbar.
  2. Click the Add button on the Global Properties toolbar.
  3. In the Name textbox, type PATH_Windows.
  4. Add Documentation to the Global Property.
  5. In the Value textbox, type:

C:\Program Files\OpConxps\MSLSAM

  1. Click the Save button on the Global Properties toolbar.
  2. Close the Global Properties tab.
  3. Under Administration, click on Job Master.
  4. In the Schedule drop-down list, select My First Schedule.
  5. In the Job drop-down list, select Windows Job 1.
  6. Update your command line to use the new properties in place of the hard-coded text. Change the following:

“C:\Program Files\OpConxps\MSLSAM\genericp.exe” –t20

to:

“[[PATH_Windows]]\genericp.exe” –t[[RUNTIME]]

  1. Click the Save button.
  2. Repeat for Windows Job 2 through Windows Job 4.
  3. Close the Job Master tab.
  4. Open the List or Matrix.
  5. Navigate to the current date.
  6. Verify that My First Schedule has completed.
  • If not, then we need to cancel all Jobs to close the Schedule.
  1. Open the Schedule Build screen.
  2. Select My First Schedule from the Schedule Selection box.
  3. Check the Overwrite Existing Schedule checkbox.
  4. Press the Build button.
  5. Click the Released radio button.
  6. Click the OK button.
  7. Close the Build Schedules screen.
  8. Open the List or Matrix.
  9. Navigate to the current date.
  10. Expand (if in the List view) or click (if in the Matrix view) My First Schedule.
  11. Verify that all Jobs Finished OK.
  12. Right-Click on Windows Job 1.
  13. Select Job Information.
  14. Click the Configuration tab.
  15. Click the Token Replacement Values row in the grid.
  16. Verify that the proper value was attributed to each Global Property in the Token Replacement Values row.
  17. Click OK and close the List/Matrix view.